import urllib.parse as up

# params = up.urlencode({'wd': '邱文斌'})
params = up.urlencode({'wd': '邱文斌', 'pn': '10'})
print(params)
# url = 'http://www.baidu.com/s?' + params
# url = 'http://www.baidu.com/s?%s' % params
url = 'http://www.baidu.com/s?{}'.format(params)
print(url)
